package com.atguigu.mapper;

import com.atguigu.base.BaseMapper;
import com.atguigu.entity.RolePermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: 翟文海
 * @Date: 2022/11/4/004 13:20
 * @Version: 1.0
 * @Description:
 **/
public interface RolePermissionMapper extends BaseMapper<RolePermission> {
    List<Long> findPermissionIdListByRoleId(Long id);

    void deleteBatch(@Param("roleId") Long roleId,@Param("removePermissionIdList") List<Long> removePermissionIdList);

    RolePermission findPermissionDelByRoleIdAndPid(@Param("roleId")Long roleId,@Param("permissionId")Long permissionId);

    void insertBatch(@Param("roleId") Long roleId,@Param("permissionIds") List<Long> permissionIds);
}
